1. Technical Field
The disclosure relates to an electronic circuit, and more particularly to a frequency detection circuit.
2. Related Art
In applications, an integrated circuit (IC) sometimes needs different input reference frequencies, and then completes the application of subsequent circuits through the input reference frequencies. For example, a phase lock loop (PLL) realizes the technology of frequency and phase synchronization by receiving a reference frequency based on feedback control principles.
The PLL receives an external reference frequency, and keeps a circuit frequency output synchronous with the reference frequency. When the reference frequency or a phase changes, the PLL may detect the change and adjust the output frequency by means of the internal feedback control until the output frequency is again synchronous with the reference frequency. Additionally, in actual applications of the PLL the input end may be coupled to different reference clocks (or oscillating crystals), such as 14.318 MHz or 25 MHz. Different reference frequencies are thus generated and input to the PLL.
For many reasons, the same IC may need to be coupled to different reference clock oscillations in order to receive a plurality of different reference frequencies. Two examples are now described. In the first example a specific IC uses a 25 MHz oscillating crystal to provide a desired reference frequency; if the 25 MHz oscillating crystal is out of stock, a 48 MHz oscillating crystal can at present be used to provide the reference frequency, which can achieve the same efficacy as the 25 MHz oscillating crystal in combination with the frequency dividing action. In the second example a specific IC has a built-in 25 MHz oscillation circuit; it is assumed that, after the IC is connected to a printed circuit board (PCB), since the PCB has a 48 MHz reference frequency the 48 MHz of the motherboard can be directly used as an input frequency, and frequency dividing can then be used to reduce the external elements (such as oscillating crystals and capacitors), as required by the 25 MHz oscillation circuit.
The previous description demonstrates that the conventional IC requires many extra pins as a selection mechanism, so that a plurality of reference frequencies provided from an external source may function normally. Assuming that the reference frequency output from the outside may be 25 MHz or 48 MHz, an extra pin must be used, and different signals are transferred to the pin to inform the IC of which reference frequency is to be used at this time. For example, when the received signal is “1”, the 25 MHz frequency is selected and when the received signal is “0”, the 48 MHz frequency is selected. However, in the prior art the more reference frequencies are required, the more pins are needed. For example, when five different reference frequencies to select are required, three extra pins are needed. Since electronic products are designed for minimal size, the space required for even one pin is at a premium. Eventually, there is no space for the extra pins.